import request from '@/utils/request'

export function getMarketingTenant(tenantId) {
  return request({
    url: `/api/device/marketing-template?tenantId=${tenantId}`,
    method: 'get'
  })
}

export function getMarketingTemplate(templateId) {
  return request({
    url: `/api/device/marketing-template/${templateId}`,
    method: 'get'
  })
}

export function postMarketingTemplate(data) {
  return request({
    url: `/api/device/marketing-template`,
    method: 'post',
    data
  })
}

export function deleteMarketingTemplate(templateId) {
  return request({
    url: `/api/device/marketing-template/${templateId}`,
    method: 'delete'
  })
}

export function putMarketingTemplate(templateId,data) {
  return request({
    url: `/api/device/marketing-template/${templateId}`,
    method: 'put',
    data
  })
}